home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- #include <vcl\vcl.h>
- #pragma hdrstop
-
- #include "Befund1.h"
- //---------------------------------------------------------------------------
- #pragma resource "*.dfm"
-
- const int Max = 10;
- TForm1 *Form1;
- String Diagnose[Max];
- int Nr;
-
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::FormCreate(TObject *Sender)
- {
- randomize ();
- ScrollBar1->Min = 0;
- ScrollBar1->Max = Max - 1;
- Diagnose[0] = "Hm...";
- Diagnose[1] = "Das ist ein Ding!";
- Diagnose[2] = "Sieh mal an!";
- Diagnose[3] = "Was soll ich sagen?";
- Diagnose[4] = "TatsΣchlich?";
- Diagnose[5] = "So geht es Dir also.";
- Diagnose[6] = "Du hast Probleme.";
- Diagnose[7] = "Das kann ich verstehen.";
- Diagnose[8] = "Ich bin sprachlos.";
- Diagnose[9] = "Naja...";
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Button1Click(TObject *Sender)
- {
- Panel1->Caption = "";
- Edit1->Text = "";
- Edit1->SetFocus ();
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Button2Click(TObject *Sender)
- {
- Nr = random (Max);
- Panel1->Caption = Diagnose[Nr];
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::ScrollBar1Change(TObject *Sender)
- {
- Panel1->Caption = Diagnose[ScrollBar1->Position];
- }
- //---------------------------------------------------------------------------